/**
 * 
 */
package neptune.web.client.services.user;

import neptune.web.client.model.SerializableUser;
import neptune.web.client.services.SecurityException;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * @author Roberto Bifulco [info@robertobifulco.it, robertobifulco.it]
 * 
 */
@RemoteServiceRelativePath("/UserService.cmd")
public interface UserService extends RemoteService {

	public static class Util {

		public static UserServiceAsync getInstance() {

			return GWT.create(UserService.class);
		}
	}

	public boolean addUser(SerializableUser user) throws SecurityException,
			Exception;

	public boolean removeUser(String username) throws SecurityException, Exception;

	public SerializableUser[] getUsers(int begin, int end, int sortId,
			boolean ascending) throws SecurityException, Exception;

	public SerializableUser getUser(String username) throws SecurityException,
			Exception;

	public boolean updateUser(SerializableUser user) throws SecurityException,
			Exception;
}
